<?php

namespace app\food\model;

use think\Model;

class Product extends Model
{

    //与调味表一对多的关系
    public function seasonings()
    {
        return $this->hasMany('Seasoning','product_id','id');
    }

    //与步骤process表一对多的关系
    public function processes()
    {
        return $this->hasMany('Process','product_id','id');
    }

    //与做法make表一对多的关系
    public function makes()
    {
        return $this->hasMany('Make','product_id','id');
    }

    //与特点表feature表一对多的关系
    public function features() {
        return $this->hasMany('Feature','product_id','id');
    }

}